package com.example.lib_runnable;

public class MyRunnable implements Runnable {
    private String name;

    public MyRunnable(String str) {
        str = name;
        System.out.println("Runnable:" + str + "is create");
    }

    @Override
    public void run() {
        System.out.println("运行线程No." + name);
        try {
            Thread.sleep(1000);
        } catch (Exception e) {
            e.getStackTrace();
        }
        System.out.println("结束线程No" + name);
    }
}
